package ui.model;

import bean.ModelType;
import ui.interf.HModelTag;
import tool.UIEventSender;

import javax.swing.*;

public class BaseModel extends JPanel implements HModelTag {
    private ModelType modelType;
    public BaseModel(ModelType modelType)
    {
        this.modelType = modelType;
        this.setBorder(BorderFactory.createTitledBorder(modelType.toString()));
        Regeist();
    }

    public ModelType getModelType() {
        return modelType;
    }

    @Override
    public void Regeist() {
        UIEventSender.getInstance().Regeist(modelType,this);
    }
}
